﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class ControlPanel_Member_MemberList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //接收从另外的页面传来的参数
        if (PreviousPage != null)
        {
            string userName;
            userName = ((TextBox)PreviousPage.FindControl("txt_UserName")).Text;
            if (userName != "")
                txt_UserName.Text = userName;
            GridViewMemberUser.DataBind();
        }



    }


    protected void GridViewMemberUser_RowCreated(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Cells[e.Row.Cells.Count - 1].Attributes.Add("onclick", "return confirm('确定要删除会员：[" + e.Row.DataItem + "]吗？');");

        }

    }
    protected void mnu_MemberIndex_MenuItemClick(object sender, MenuEventArgs e)
    {
        txt_UserName.Text = "";

        ObjectDataSourceMembershipUser.SelectParameters["searchType"].DefaultValue = e.Item.Value.ToString();

        GridViewMemberUser.DataBind();
    }
    protected void btn_Search_Click(object sender, EventArgs e)
    {
        ObjectDataSourceMembershipUser.SelectParameters["searchType"].DefaultValue = rbl_SearchCondition.SelectedValue;

        GridViewMemberUser.DataBind();
    }
}

